﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExamSystem.Mdeol;
using ExamSystem.BLL;
namespace ExamSystem.ht
{
    public partial class TPagerStudent_Edit : System.Web.UI.Page
    {
        private TstudentBLL tb = new TstudentBLL();
        private TpagerBLL tbl = new TpagerBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!Page.IsPostBack)
            {
                string id = Request.QueryString["id"];
                Tpager t = tbl.selecttpid(int.Parse(id));
                if (t!=null)
                {
                    this.lbTpName.InnerText = t.TpName;
                    List<Tstudent> list = tb.selectall();
                    this.Repeater1.DataSource = list;
                    this.Repeater1.DataBind();
                }
                else
                {
                    util.FunHelper.LayerAlter(this, "数据不存在", "TPager_List.aspx");
                }
            }
            
        }
        //保存
        protected void btnSave_Click(object sender, EventArgs e)
        {
            
            string id=Request.QueryString["id"];
            string ids = this.ids.Value;
            tbl.updatetpagerstudent(int.Parse(id),ids);
            util.FunHelper.LayerAlter(this,"操作成功","TPager_List.aspx");
        }
    }
}